package org.jetlinks.pro.things.impl.connector.script;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jetlinks.core.message.ThingMessage;
import org.jetlinks.core.things.ThingType;
import org.jetlinks.core.things.ThingsDataManager;
import org.slf4j.Logger;

@AllArgsConstructor
@Slf4j
public class DefaultThingDataHelper implements ThingDataHelper{
    private final ThingType thingType;
    private final String thingId;
    private final ThingsDataManager dataManager;
    @Override
    public Logger getLogger() {
        return log;
    }

    @Override
    public ThingsDataManager getDataManager() {
        return dataManager;
    }

    @Override
    public ThingMessage getMessage() {
        return null;
    }

    @Override
    public long getTimestamp() {
        return System.currentTimeMillis();
    }

    @Override
    public long getTimestamp(String property) {
        return System.currentTimeMillis();
    }

    @Override
    public Object getProperty(String property) {
        return null;
    }

    @Override
    public ThingType getThingType() {
        return thingType;
    }

    @Override
    public String getThingId() {
        return thingId;
    }
}
